import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import store from './store'
import API from './api/content.js'
import SETAPI from './api/settings'
import echarts from 'echarts'
import comm from './service/comm'
import addressDetail from './service/address'
import invAdres from './service/interface'
import localSafety from './service/safety'
import commChart from './service/charts'
import * as filter from './filter/index'
import i18n from './lan'
import './assets/iconfont/iconfont.css'
import './assets/iconfont/iconfont.ttf'
import './assets/iconfont/iconfont.eot'
import './assets/iconfont/iconfont.svg'
import './assets/iconfont/iconfont.woff'
import errorMsg from './service/errormsg'
import workMode from './service/workmode'

// import Vconsole from 'vconsole'

// let vConsole = new Vconsole()
// Vue.use(vConsole);

Object.keys(filter).forEach(key => {
    Vue.filter(key, filter[key])
})
Vue.prototype.API = API
Vue.prototype.SETAPI = SETAPI
Vue.prototype.$echarts = echarts
Vue.prototype.comm = comm
Vue.prototype.addressDetail = addressDetail
Vue.prototype.invAdres = invAdres
Vue.prototype.localSafety = localSafety
Vue.prototype.commChart = commChart
Vue.prototype.errorMsg = errorMsg
Vue.prototype.workMode = workMode
Vue.use(require('vue-moment'));
import {
    Button,
    DatetimePicker,
    Popup,
    Icon,
    Loading,
    List,
    Tabbar,
    TabbarItem,
    RadioGroup,
    Radio,
    Cell,
    CellGroup,
    Form,
    Field,
    Col,
    Row,
    Checkbox,
    NavBar,
    Divider,
    Picker,
    Search,
    SwipeCell,
    Area,
    PullRefresh,
    Collapse,
    CollapseItem,
    Empty,
    IndexBar,
    IndexAnchor,
    Tab,
    Tabs,
    Overlay,
    Switch
} from 'vant'
Vue.use(DatetimePicker)
Vue.use(Button)
Vue.use(Popup)
Vue.use(Icon)
Vue.use(Loading)
Vue.use(List)
Vue.use(Tabbar)
Vue.use(TabbarItem)
Vue.use(RadioGroup)
Vue.use(Radio)
Vue.use(Cell)
Vue.use(CellGroup)
Vue.use(Form)
Vue.use(Field)
Vue.use(Col)
Vue.use(Row)
Vue.use(Checkbox)
Vue.use(NavBar)
Vue.use(Divider)
Vue.use(Picker)
Vue.use(Search)
Vue.use(SwipeCell)
Vue.use(Area)
Vue.use(PullRefresh)
Vue.use(Collapse)
Vue.use(CollapseItem)
Vue.use(Empty)
Vue.use(IndexBar)
Vue.use(IndexAnchor)
Vue.use(Tab)
Vue.use(Tabs)
Vue.use(Overlay)
Vue.use(Switch)

Vue.config.productionTip = false;

new Vue({
    i18n,
    router,
    store,
    render: h => h(App)
}).$mount('#app')